package equipe2msvy.ProjectServeurApplication.beans;

import java.util.Collection;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;


@Entity
@Table(name="SOCIETE")
@PrimaryKeyJoinColumn(name="ID_SOCIETE")
public class Societe extends Utilisateur{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Column(name="NUMERO_SIRET")
	private String numeroSiret;
	@Column(name="NOM")
	private String nom;
	@Column(name="ADRESSE")
	private String adresse;
	@Column(name="TELEPHONE")
	private String telephone;
	@Column(name="FAX")
	private String fax;
	@Column(name="TYPE")
	private String type;
	@OneToMany(mappedBy="societe" , fetch = FetchType.LAZY)
	private Collection<Offre> offres;
	@OneToMany(mappedBy="societe" , fetch = FetchType.LAZY)
	private Collection<MembreSociete> membreSocietes;
	public Societe(String login, String password, String numeroSiret,
			String nom, String adresse, String telephone, String fax,
			String type, Collection<Offre> offres,
			Collection<MembreSociete> membreSocietes) {
		super(login, password);
		this.numeroSiret = numeroSiret;
		this.nom = nom;
		this.adresse = adresse;
		this.telephone = telephone;
		this.fax = fax;
		this.type = type;
		this.offres = offres;
		this.membreSocietes = membreSocietes;
	}
	public Societe() {
		super();
		// TODO Auto-generated constructor stub
	}
	public String getNumeroSiret() {
		return numeroSiret;
	}
	public void setNumeroSiret(String numeroSiret) {
		this.numeroSiret = numeroSiret;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getAdresse() {
		return adresse;
	}
	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Collection<Offre> getOffres() {
		return offres;
	}
	public void setOffres(Collection<Offre> offres) {
		this.offres = offres;
	}
	public Collection<MembreSociete> getMembreSocietes() {
		return membreSocietes;
	}
	public void setMembreSocietes(Collection<MembreSociete> membreSocietes) {
		this.membreSocietes = membreSocietes;
	}
}
